package com.mooc.dao;


import java.util.HashMap;
import java.util.Map;

public class DaoFactory {
    private static Map<Class,Object> daoMap=new HashMap<>();
    static {
//        daoMap.put(UserDao.class,new UserDaoImpl());
//        daoMap.put(DocumentDao.class,new DocumentDaoImpl());
    }

    public static <T> T getDao(Class daoClass){
        return (T)daoMap.get(daoClass);
    }
}
